From: Jasper St. Pierre Date: Thu, 16 Aug 2012 17:54:03 +0000 (-0400) Subject: messageTray: Close the current box pointer when clicking on the same item X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6127 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=44b4741e35bb3881394111d6b385e79732e8ba06;p=gnome-shell.git messageTray: Close the current box pointer when clicking on the same item --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index fde083385..5b0403a4c 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1640,7 +1640,8 @@ const MessageTray = new Lang.Class({ if (summaryItem.source.handleSummaryClick()) { this._setClickedSummaryItem(null); } else { - this._setClickedSummaryItem(summaryItem, button); + if (!this._setClickedSummaryItem(summaryItem, button)) + this._setClickedSummaryItem(null); } this._updateState(); @@ -2251,7 +2252,7 @@ const MessageTray = new Lang.Class({ _setClickedSummaryItem: function(item, button) { if (item == this._clickedSummaryItem && button == this._clickedSummaryItemMouseButton) - return; + return false; if (this._clickedSummaryItem) { this._clickedSummaryItem.actor.remove_style_pseudo_class('selected'); @@ -2278,6 +2279,8 @@ const MessageTray = new Lang.Class({ this._trayMotionId = Main.layoutManager.trayBox.connect('notify::anchor-y', Lang.bind(this, this._adjustSummaryBoxPointerPosition)); } + + return true; }, _onSummaryBoxPointerUngrabbed: function() {